#include <iostream>
#include <queue>
using namespace std;
const int N1=1e6+10;
const int N2=1e3+10;
typedef unsigned long long ull;
ull n,a[N1],b[N1],d[N1],c;
priority_queue<ull,vector<ull>,less<ull>> tmp_heap;
priority_queue<ull,vector<ull>,greater<ull>> result_heap;
int main()
{
	cin>>n;
	for (int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for (int i=0;i<n;i++)
	{
		cin>>b[i];
	}
	for (int i=0;i<n;i++)
	{
		for (int j=0;j<n;j++)
		{
			c=a[i]+b[j];
			if (tmp_heap.size()<n)		
			{
				tmp_heap.push(c);	
			} 
			else if (tmp_heap.top()>c)
			{
				tmp_heap.pop();
				tmp_heap.push(c);
			}
			if (tmp_heap.top()<c)
				break;		
		}
	}	
	while (tmp_heap.size())
	{
		result_heap.push(tmp_heap.top());
		tmp_heap.pop();		
	} 
	while(result_heap.size())
	{
		cout<<result_heap.top()<<" ";
		result_heap.pop();
	}
	return 0;
}